# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


class CrawlerItem(scrapy.Item):
    # define the fields for your item here like:
    # name = scrapy.Field()
    pass


class TestItem(scrapy.Item):
    a = scrapy.Field()  # 景点id


class SpotItem(scrapy.Item):
    id = scrapy.Field()  # 景点id
    url = scrapy.Field()
    # comment_url = scrapy.Field()
    cnname = scrapy.Field()   # 景点中文名字
    # enname = scrapy.Field()  # 景点英文名字
    catename = scrapy.Field()   # 分类名，列如景点观光,景点
    grade = scrapy.Field()  # 评分
    rank = scrapy.Field()  # 排名
    lat = scrapy.Field()
    lng = scrapy.Field()


class PositionItem(scrapy.Item):
    spot_id = scrapy.Field()  # id
    lat = scrapy.Field()
    lng = scrapy.Field()


class CommentItem(scrapy.Item):
    type = 'comment'
    id = scrapy.Field()   # 评论ID
    author_id = scrapy.Field() # 评论者Id
    author_name = scrapy.Field() # 评论者名字
    content = scrapy.Field()  # 内容
    img_num = scrapy.Field()    # 分享照片的数量
    star_level = scrapy.Field()  # 评分
    date = scrapy.Field()  # 日期
    useful = scrapy.Field()  # 点赞数
    spot_id = scrapy.Field()  # 景点


class CommentFinishedItem(scrapy.Item):
    '''
    某一景点评论爬取完成
    '''
    type = 'finish_comment'
    finished = scrapy.Field()   # 评论ID
    spot_id = scrapy.Field()    # 景点ID


class TouristItem(scrapy.Item):
    type = 'tourist'
    id = scrapy.Field()  # 用户ID
    name = scrapy.Field()   # 用户名字
    gender = scrapy.Field()
    birthday = scrapy.Field()
    # link = scrapy.Field() # 主页连接 www.qyer.com/u/用户id

